<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>后台管理系统</title>
    <link rel="icon" href="/img/logo.png" type="image/x-icon"/>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <script src="/script/jquery-3.3.1.min.js"></script>
    <script src="/script/wangEditor.js"></script>
    <script src="/layui/layui.js"></script>
    <script src="/script/admin/projectInvate/edit.js"></script>
    <script src="/script/admin/common.js"></script>
    <style type="text/css">
        .item-hide{
            display: none;
        }
    </style>
</head>
<body>
<input type="hidden" id="id" th:value="${app.id}">
    <form class="layui-form" id="form">
        <div class="layui-form-item">
            <label class="layui-form-label">标题:</label>
            <div class="layui-input-block layui-col-md5">
                <input type="text" name="title" lay-verify="required" th:value="${app.title}" id="title" autocomplete="off"  placeholder="请输入标题" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">关键字</label>
            <div class="layui-input-block layui-col-md5">
                <input type="text" name="keyword" id="keyword" th:value="${keywords}" autocomplete="off"  placeholder="请输入关键字"  class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">mark</label>
            <div class="layui-input-block layui-col-md5">
                <input type="text" name="mark" id="mark" autocomplete="off" th:value="${app.mark}"  placeholder="请输入mark"  class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">邀请链接</label>
            <div class="layui-input-block layui-col-md5">
                <input type="text" name="invite_url" id="invite_url" th:value="${app.inviteUrl}" autocomplete="off"  placeholder="请输入邀请链接"  class="layui-input">
            </div>
            <span class="layui-btn-normal layui-btn" id="createInviteImgBtn" >生成邀请码</span>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">支持设备</label>
            <div class="layui-input-block layui-col-md5">
                <input type="radio" name="device" value="0" title="全支持" th:checked="${app.device == 0}">
                <input type="radio" name="device" value="1" title="安卓" th:checked="${app.device == 1}">
                <input type="radio" name="device" value="2" title="苹果" th:checked="${app.device == 2}">
                <input type="radio" name="device" value="3" title="电脑客户端" th:checked="${app.device == 3}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">类型</label>
            <div class="layui-input-block layui-col-md5">
                <select name="type" id="type">
                    <option value="1" th:selected="${app.type == 1}">App</option>
                    <option value="2" th:selected="${app.type == 2}">素材</option>
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">公司</label>
            <div class="layui-input-block layui-col-md5">
                <input type="text" name="companyName" id="companyName" th:value="${app.companyName}" autocomplete="off"  placeholder="请输入公司名称"  class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">上传封面:</label>
            <div class="layui-input-block layui-col-md5">
                <button type="button" class="layui-btn" id="update_cover_btn">上传图片</button>
                <input type="hidden" id="cover_img" name="cover" lay-verify="cover" th:value="${app.cover}">
                <div class="layui-upload-list">
                    <img class="layui-upload-img" id="demo1" th:src="${app.cover}">
                    <p id="demoText"></p>
                </div>
            </div>
        </div>

        <div class="layui-col-md12" lay-verify="content" id="addEdit1" name="content" >
            <input type="hidden" id="content" th:value="${app.content}">
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">下载次数</label>
            <div class="layui-input-block layui-col-md5">
                <input type="text" name="down_count" id="down_count" th:value="${app.downCount}"  autocomplete="off"  placeholder="请输入下载次数"  class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">伪下载次数</label>
            <div class="layui-input-block layui-col-md5">
                <input type="text" name="false_down_count" id="false_down_count" th:value="${app.falseDownCount}"  autocomplete="off"  placeholder="请输入伪下载次数"  class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">上传邀请二维码:</label>
            <div class="layui-input-block layui-col-md5">
                <button type="button" class="layui-btn" id="update_cover_btn2">上传邀请二维码</button>
                <button type="button" class="layui-btn" id="btnUpload">开始上传</button>
                <input type="hidden" id="cover_img2" name="cover" lay-verify="invateImage" th:value="${app.inviteImg}">
                <div class="layui-upload-list">
                    <img class="layui-upload-img" id="demo2" th:src="${app.inviteImg}">
                    <p id="demoText2"></p>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">提现图:</label>
            <div class="layui-input-block layui-col-md5">
                <button type="button" class="layui-btn" id="update_cover_btn3">上传图片1</button>
                <input type="hidden" id="cover_img3" name="withdraw" lay-verify="withdraw" th:value="${app.withdraw}">
                <div class="layui-upload-list">
                    <img class="layui-upload-img" id="demo3" th:src="${app.withdraw}">
                    <p id="demoText3"></p>
                </div>
            </div>
        </div>

        <div class="layui-form-item layui-col-md-offset1" style="margin-bottom: 25px;">
            <div class="layui-btn" id="submit" lay-filter="form" lay-submit>提交</div>
        </div>


    </form>
</body>
</html>